package com.shawn.test;

import org.omg.Messaging.SyncScopeHelper;

abstract class Base{
	public Base(int i){
		System.out.println("Base constructor , i="+i);
	}
	public abstract void f();
}
public class AnonymousConstructor {
    public static Base getBase(int i){
    	return new Base(i){
    		{System.out.println("Inside instance initializer");}
    		public void f(){
    			System.out.println("In anonymous f()");
    		}
    	};
    }
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Base base = getBase(47);
		base.f();

	}

}
